<template>
  <div class="numberInput-demo">
    <h3 class="title">基本</h3>
    <div v-width="300">
      <p>普通：{{ value }}</p>
      <d-number-input v-model="value"></d-number-input>
      <p>精确2位小数点：{{ value2  }}</p>
      <d-number-input v-model="value2" :precision="2"></d-number-input>
    </div>
    <h3 class="title">最大值最小值</h3>
    <div v-width="300">
      <p>{{ value3 }}</p>
      <d-number-input v-model="value3" :max="10" :min="-1"></d-number-input>
    </div>
    <h3 class="title">使用加减控制</h3>
    <div v-width="300">
      <p>{{ value4 }}</p>
      <d-number-input v-model="value4" :useOperate="true"></d-number-input>
    </div>
  </div>
</template>

<script>
export default {
  name: 'numberInputDemo',
  data () {
    return {
      value: 0,
      value2: 0,
      value3: 0,
      value4: 0
    }
  }
}
</script>

<style lang="stylus" scoped>
// .numberInput-demo
</style>
